package com.zyf.swordRefersOffer;

import java.util.Scanner;

public class _07_ {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[][] qq = new int[2][2];
		for (int i = 0; i < qq.length && sc.hasNextInt(); i++) {
			for (int j = 0; j < qq.length && sc.hasNextInt(); j++) {
				qq[i][j] = sc.nextInt();
			}
		}
		for (int i = 0; i < qq.length; i++) {
			sxhs(qq[i][0], qq[i][1]);
		}
	}

	public static void sxhs(int n, int m) {
		int flag = 0;
		int bw = 0;
		int sw = 0;
		int gw = 0;
		for (; n <= m; n++) {
			bw = n / 100;
			sw = n / 10 % 10;
			gw = n % 10;
			if (n == bw * bw * bw + gw * gw * gw + sw * sw * sw) {
				System.out.print(n);
				flag = 1;
			}
		}
		if (flag == 0) {
			System.out.println("no");
		}
	}
}
